<!DOCTYPE html>
<?php
include_once 'admin/config/config.php';
mydb_connect();?>
<!--[if lt IE 7]>   <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>      <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>      <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
	
<!-- Mirrored from html.coolorize.com/summarize/html/blog.html by HTTrack Website Copier/3.x [XR&CO'2013], Thu, 24 Apr 2014 07:03:29 GMT -->
<head>

		<meta charset="utf-8">
		<?php if(isset($_GET['id'])){ 
		$select_news = $conn->prepare("SELECT * FROM `news` WHERE id = :id");
						$select_news->execute(array('id' => $_GET['id'] ));
						$row_news = $select_news->fetch(); ?>
		<title><?php echo $row_news['title'];?> | TechAfghanistan</title>
		<meta property="og:image" content="http://tech.af/author/images/<?php echo $row_news['img_name']; ?>" />
		<?php } else{ ?>
		<title>TechAfghanistan</title>

		<?php } ?>
		<meta name="description" content="">

		<!-- Mobile Devices Viewport Resset-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">

		<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">

<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
		<!--[if IE 8]>
			<link rel="stylesheet" href="/assets/font-awesome/css/font-awesome-ie7.min.css">
		<![endif]-->
		<link rel="shortcut icon" href="http://faviconist.com/icons/2592e4bec71f9cbf2aaa7826bfa7cf45/favicon.ico" />
		<link rel="stylesheet" href="/assets/prettyPhoto/css/prettyPhoto.css">

		<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700|Lato:300,400,700,400italic,700italic|Droid+Serif' rel='stylesheet' type='text/css'>

		<!-- base layout styling -->
		<link rel="stylesheet" href="/assets/css/base.css">

		<!-- components styling -->
		<link rel="stylesheet" href="/assets/css/components.css">
		
		<!-- template colorschemes -->
		<link rel="stylesheet" href="/assets/colorschemes/default.css">

		<script src="/assets/modernizr-2.6.2-respond-1.1.0.min.js"></script>
		<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "bb5b50e6-3050-424f-8089-ae3bd9e9b85e", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>

	</head>
	<body>

		<h1 class="sr-only">TechAfghanistan</h1>
			
		<nav id="header" class="header-navbar" role="navigation">

			<div class="header-navbar-inner container">
			
				<div id="brand" class="navbar-brand">
					<a href="/" rel="bookmark">

						<!-- to disable lazy loading, remove data-src and data-src-retina -->
						<img src="/assets/img/logo.png" data-src="/assets/img/logo.png" data-src-retina="/assets/img/logo-retina.png" width="244" height="56" alt="">

						<!--fallback for no javascript browsers-->
						<noscript>
							<img src="/assets/img/logo.png" alt="">
						</noscript>
					</a>
				</div>

				<ul class="nav nav-pages hidden-xs">
					<li><a href="about.php">About</a></li>
					<li><a href="contact.php">Contact</a></li>
					<li><a href="advertise.php">Advertise </a></li>
					<li><a href="terms.php">Terms &amp; Conditions</a></li>
					<li><a href="privacy.php">Privacy</a></li>
				</ul>

				<ul class="nav nav-icons">
					<li>
						<a href="#" class="btn-icon" data-toggle=".header-navbar-inner" data-toggle-class="search-toggled-in">
							<span class="search-toggled-out-icon glyphicon glyphicon-search"></span>
							<span class="search-toggled-in-icon glyphicon glyphicon-remove"></span>
						</a>
					</li>
				</ul>

				<div class="search-wrapper js-stoppropagation">
					<div class="search-wrapper-inner">
						<script>
  (function() {
    var cx = '001833073212241187150:o0ofdrlhlsq';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:search></gcse:search>
						<!-- <form>
							<input type="text" value="" placeholder="search ... ">
							<button class="btn-icon" type="submit"><span class="glyphicon glyphicon-search"></span></button>
						</form> -->
					</div>
				</div>

				<ul class="nav navbar-nav">
					<li>
						<a href="http://tech.af" data-toggle="li">Home</a>
					</li>
					<li class="full-subnav-wrapper">
						<a href="http://tech.af/section/news" data-toggle="li">News</a>

						<div class="row subnav-wrapper subnav-tabbed">
							
							<ul class="col-md-2 col-sm-2 subnav-tabbed-tabs alignright">
								<li class="active"><a href="#tabAll">All </a></li>
								<?php 
									$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
									while($row_cats = $select_cats->fetch()){
										$select_num_news = $conn->query("SELECT * FROM `news` WHERE `section`='news' AND category_id='".$row_cats['id']."'");
										if($select_num_news->rowCount()==0){
											continue;
										}
								?>
								<li><a href="#tab<?php echo $row_cats['id']; ?>"><?php echo $row_cats['category_name']; ?></a></li>
								<?php } ?>
								
							</ul>

							<div class="col-md-10 col-sm-10 subnav-tabbed-panels">

								<div id="tabAll" class="subnav-tabbed-panel active">
								<?php 
								// News - ALL
								$select_news = $conn->query("SELECT * FROM `news` WHERE `section`='news' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_news = $select_news->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="single.html">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_news['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_news['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_news['id']; ?>"><?php echo $row_news['title']; ?></a> </h3>
									
									</article>
									<?php } ?>
									
								</div>
								<?php 
								$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
								while($row_cats = $select_cats->fetch()){
								?>
								<div id="tab<?php echo $row_cats['id']; ?>" class="subnav-tabbed-panel">
								<?php 
								// News - ALL
								$select_news = $conn->query("SELECT * FROM `news` WHERE `section`='news' AND `category_id`='".$row_cats['id']."' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_news = $select_news->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="single.html">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_news['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_news['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_news['id']; ?>"><?php echo $row_news['title']; ?></a> </h3>
									
									</article>
									<?php } ?>

								</div>
								<?php } ?>

							</div>

						</div>

					</li>
					<li class="full-subnav-wrapper">
						<a href="http://tech.af/section/article" data-toggle="li">Articles</a>

						<div class="row subnav-wrapper subnav-tabbed">
							
							<ul class="col-md-2 col-sm-2 subnav-tabbed-tabs alignright">
								<li class="active"><a href="#tab1All">All </a></li>
								<?php 
									$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
									while($row_cats = $select_cats->fetch()){
										$select_num_article = $conn->query("SELECT * FROM `news` WHERE `section`='article' AND category_id='".$row_cats['id']."'");
										if($select_num_article->rowCount()==0){
											continue;
										}
								?>
								<li><a href="#tab1<?php echo $row_cats['id']; ?>"><?php echo $row_cats['category_name']; ?></a></li>
								<?php } ?>
								
							</ul>

							<div class="col-md-10 col-sm-10 subnav-tabbed-panels">

								<div id="tab1All" class="subnav-tabbed-panel active">
								<?php 
								// article - ALL
								$select_article = $conn->query("SELECT * FROM `news` WHERE `section`='article' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_article = $select_article->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="#">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_article['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_article['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_article['id']; ?>"><?php echo $row_article['title']; ?></a> </h3>
									
									</article>
									<?php } ?>
									
								</div>
								<?php 
								$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
								while($row_cats = $select_cats->fetch()){
								?>
								<div id="tab1<?php echo $row_cats['id']; ?>" class="subnav-tabbed-panel">
								<?php 
								// article - ALL
								$select_article = $conn->query("SELECT * FROM `news` WHERE `section`='article' AND `category_id`='".$row_cats['id']."' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_article = $select_article->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="single.html">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_article['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_article['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_article['id']; ?>"><?php echo $row_article['title']; ?></a> </h3>
									
									</article>
									<?php } ?>

								</div>
								<?php } ?>

							</div>

						</div>

					</li>
					<li class="full-subnav-wrapper">
						<a href="http://tech.af/section/review" data-toggle="li">Reviews</a>

						<div class="row subnav-wrapper subnav-tabbed">
							
							<ul class="col-md-2 col-sm-2 subnav-tabbed-tabs alignright">
								<li class="active"><a href="#tab2All">All </a></li>
								<?php 
									$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
									while($row_cats = $select_cats->fetch()){
										$select_num_review = $conn->query("SELECT * FROM `news` WHERE `section`='review' AND category_id='".$row_cats['id']."'");
										if($select_num_review->rowCount()==0){
											continue;
										}
								?>
								<li><a href="#tab2<?php echo $row_cats['id']; ?>"><?php echo $row_cats['category_name']; ?></a></li>
								<?php } ?>
								
							</ul>

							<div class="col-md-10 col-sm-10 subnav-tabbed-panels">

								<div id="tab2All" class="subnav-tabbed-panel active">
								<?php 
								// review - ALL
								$select_review = $conn->query("SELECT * FROM `news` WHERE `section`='review' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_review = $select_review->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="#">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_review['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_review['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_review['id']; ?>"><?php echo $row_review['title']; ?></a> </h3>
									
									</article>
									<?php } ?>
									
								</div>
								<?php 
								$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
								while($row_cats = $select_cats->fetch()){
								?>
								<div id="tab2<?php echo $row_cats['id']; ?>" class="subnav-tabbed-panel">
								<?php 
								// review - ALL
								$select_review = $conn->query("SELECT * FROM `news` WHERE `section`='review' AND `category_id`='".$row_cats['id']."' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_review = $select_review->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="single.html">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_review['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_review['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_review['id']; ?>"><?php echo $row_review['title']; ?></a> </h3>
									
									</article>
									<?php } ?>

								</div>
								<?php } ?>

							</div>

						</div>

					</li>
					<li class="full-subnav-wrapper">
						<a href="http://tech.af/section/howto" data-toggle="li">How To</a>

						<div class="row subnav-wrapper subnav-tabbed">
							
							<ul class="col-md-2 col-sm-2 subnav-tabbed-tabs alignright">
								<li class="active"><a href="#tab3All">All </a></li>
								<?php 
									$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
									while($row_cats = $select_cats->fetch()){
										$select_num_howto = $conn->query("SELECT * FROM `news` WHERE `section`='howto' AND category_id='".$row_cats['id']."'");
										if($select_num_howto->rowCount()==0){
											continue;
										}
								?>
								<li><a href="#tab3<?php echo $row_cats['id']; ?>"><?php echo $row_cats['category_name']; ?></a></li>
								<?php } ?>
								
							</ul>

							<div class="col-md-10 col-sm-10 subnav-tabbed-panels">

								<div id="tab3All" class="subnav-tabbed-panel active">
								<?php 
								// howto - ALL
								$select_howto = $conn->query("SELECT * FROM `news` WHERE `section`='howto' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_howto = $select_howto->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="#">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_howto['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_howto['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_howto['id']; ?>"><?php echo $row_howto['title']; ?></a> </h3>
									
									</article>
									<?php } ?>
									
								</div>
								<?php 
								$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
								while($row_cats = $select_cats->fetch()){
								?>
								<div id="tab3<?php echo $row_cats['id']; ?>" class="subnav-tabbed-panel">
								<?php 
								// howto - ALL
								$select_howto = $conn->query("SELECT * FROM `news` WHERE `section`='howto' AND `category_id`='".$row_cats['id']."' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_howto = $select_howto->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="single.html">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_howto['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_howto['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_howto['id']; ?>"><?php echo $row_howto['title']; ?></a> </h3>
									
									</article>
									<?php } ?>

								</div>
								<?php } ?>

							</div>

						</div>

					</li>
					<li class="full-subnav-wrapper">
						<a href="http://tech.af/section/opinion" data-toggle="li">Opinions</a>

						<div class="row subnav-wrapper subnav-tabbed">
							
							<ul class="col-md-2 col-sm-2 subnav-tabbed-tabs alignright">
								<li class="active"><a href="#tab2All">All </a></li>
								<?php 
									$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
									while($row_cats = $select_cats->fetch()){
										$select_num_opinion = $conn->query("SELECT * FROM `news` WHERE `section`='opinion' AND category_id='".$row_cats['id']."'");
										if($select_num_opinion->rowCount()==0){
											continue;
										}
								?>
								<li><a href="#tab2<?php echo $row_cats['id']; ?>"><?php echo $row_cats['category_name']; ?></a></li>
								<?php } ?>
								
							</ul>

							<div class="col-md-10 col-sm-10 subnav-tabbed-panels">

								<div id="tab2All" class="subnav-tabbed-panel active">
								<?php 
								// opinion - ALL
								$select_opinion = $conn->query("SELECT * FROM `news` WHERE `section`='opinion' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_opinion = $select_opinion->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="#">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_opinion['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_opinion['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_opinion['id']; ?>"><?php echo $row_opinion['title']; ?></a> </h3>
									
									</article>
									<?php } ?>
									
								</div>
								<?php 
								$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
								while($row_cats = $select_cats->fetch()){
								?>
								<div id="tab2<?php echo $row_cats['id']; ?>" class="subnav-tabbed-panel">
								<?php 
								// opinion - ALL
								$select_opinion = $conn->query("SELECT * FROM `news` WHERE `section`='opinion' AND `category_id`='".$row_cats['id']."' ORDER BY pub_date DESC LIMIT 0, 4");
								while($row_opinion = $select_opinion->fetch()){
								?>
									<article class="entry type-post style-thumbnail col-sm-3 col-md-3">

										<figure class="entry-thumbnail">
											<a href="single.html">
												<!-- to disable lazy loading, remove data-src and data-src-retina -->
											<img src="/author/images/<?php echo $row_opinion['img_name']; ?>" width="230" height="230" class="" alt="">

													<!--fallback for no javascript browsers-->
													<noscript>
														<img src="/author/images/<?php echo $row_opinion['img_name']; ?>" alt="">
													</noscript>
											</a>
										</figure>

										<h3 class="entry-title"><a href="/post/<?php echo $row_opinion['id']; ?>"><?php echo $row_opinion['title']; ?></a> </h3>
									
									</article>
									<?php } ?>

								</div>
								<?php } ?>

							</div>

						</div>

					</li>
					
					<li class="pull-right">
						<a href="#" data-toggle="li">All Categories</a>
						<div class="subnav-wrapper">
							<ul class="subnav">
								<?php 
								$select_cats = $conn->query("SELECT * FROM news_categories ORDER BY `category_name` ASC");
								while($row_cats = $select_cats->fetch()){
								?>
									<li><a href="http://tech.af/cats/<?php echo $row_cats['id']; ?>"><?php echo $row_cats['category_name']; ?></a></li>
								<?php 
								}
								?>
							</ul>
						</div>
					</li>
				</ul>

			</div>

		</nav>
